<?php
session_start();
 if($_SESSION['user'])
 {
     header('location: index.php');
 }
    ?>

<!doctype html>
<html lang="en">
<head>
    <link>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Авторизация и регистрация</title>
    <link rel="stylesheet" href="/assets/css/style.css">
<style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: "Franklin Gothic Book",sans-serif;
    }

    form{
        display: flex;
        flex-direction: column;
    }
    input {
        margin:10px 0;
        padding: 10px;
        border: unset;
        border-bottom: 2px solid #e3e3e3;
        outline: none;
    }

    button{
        padding: 10px;
        border: unset;
        background-color: #e3e3e3;
        cursor: pointer;
    }

    a {
        color: #7c9ab7;
        font-weight: bold;
        text-decoration: none;

    }

    p{
        margin: 10px 0;
    }

    .msg {
        border: 2px solid #ffa908;
        border-radius: 5px;
        padding: 10px;
        text-align: center;
        font-weight: bold;

    }
    .logout{
        text-align: right;
        color: crimson;
    }
</style>
</head>
<body>
<!--Profile-->
<form>
     <img src="<?= $_SESSION['user']['avatar'] ?>" width="200" alt="">
    <h2 style="marging: 10px 0;"><?=$_SESSION['user']['full_name'] ?></h2>
    <a href="#"><?=$_SESSION['user']['email'] ?></a>
    <a href="vendor/logout.php" class="logout">Выход</a>
</form>
</body>
</html>
